package com.tepth.repair.receiver;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;


/**
 * Created by zhangyu on 2017/9/13.
 */

public class BootBroadcastReceiver extends BroadcastReceiver {
    static final String action_boot = "android.intent.action.BOOT_COMPLETED";

    @Override
    public void onReceive(Context context, Intent intent) {
        if (action_boot.equals(intent.getAction())) {
            //启动应用，参数为需要自动启动的应用的包名
            Intent intentActivity = context.getPackageManager().getLaunchIntentForPackage("com.tepth.repair");
            context.startActivity(intentActivity);
        }
    }
}
